package com.lmaos.allcontrol.modulecontrol;

import java.lang.reflect.Method;
import java.util.List;

import com.lmaos.allcontrol.beancontrol.entity_.LMClassParam;
import com.lmaos.allcontrol.beancontrol.utils_.ObjUtils;

public class ModuleBean {
	private String classInstallName;
	private String classPath;
	private Class clazz;
	private Object instance;
	private List<Method> methods;
	public ModuleBean(String classInstallName, String classPath, Class clazz,
			Object instance, List<Method> methods) {
		super();
		this.classInstallName = classInstallName;
		this.classPath = classPath;
		this.clazz = clazz;
		this.instance = instance;
		this.methods = methods;
	}
	public String getClassInstallName() {
		return classInstallName;
	}
	public String getClassPath() {
		return classPath;
	}
	public Class getClazz() {
		return clazz;
	}
	public void setInstance(Object instance) {
		this.instance = instance;
	}
	public Object getInstance() {
		if(instance == null){
			try {
				return clazz.newInstance();
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
		return instance;
	}
	public List<Method> getMethods() {
		return methods;
	}
	
}
